import os
import sys

project_dir = os.path.join(__file__, "../../..")
sys.path.append(project_dir)

from cion.emccd.gui import PreviewGui

# conf

#dll_file_path = "<fake>"
dll_file_path = os.path.join(project_dir, "cion/emccd/atmcd64d.dll")

#  run

if __name__ == '__main__':
    with PreviewGui(dll_file_path) as gui:
        while True:
            try:
                event, _ = gui.event_queue.get()
            except BrokenPipeError:
                break
            if event == 'exit':
                break
